package com.pilipili.zeus.educms.controller;

import com.pilipili.commonutils.Result;
import com.pilipili.zeus.educms.entity.CrmBanner;
import com.pilipili.zeus.educms.service.CrmBannerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 首页banner表 前端控制器
 *
 * @author Unlimited_Blade_Works
 * @since 2021-05-30
 */
@RestController
@RequestMapping("/educms/bannerFront")
public class BannerFrontController {
    @Autowired
    private CrmBannerService bannerService;
    @ApiOperation(value = "查询所有用户")
    @GetMapping("findAll")
    public Result findAll(){
        List<CrmBanner> list = bannerService.listBanner();
        return Result.ok().data("list",list);
    }
}
